#ifndef __BIN_INS_H__
#define __BIN_INS_H__
#include <cstdint>

// 枚举类型的二进制指令集
enum BinIns
{
  binHLT,
  binJMP,
  binCJMP,
  binOJMP,
  binCALL,
  binRET,
  binPUSH,
  binPOP,
  binLOADB,
  binLOADW,
  binSTOREB,
  binSTOREW,
  binLOADI,
  binNOP,
  binIN,
  binOUT,
  binADD,
  binADDI,
  binSUB,
  binSUBI,
  binMUL,
  binDIV,
  binAND,
  binOR,
  binNOR,
  binNOTB,
  binSAL,
  binSAR,
  binEQU,
  binLT,
  binLTE,
  binNOTC,
  binInvalid
};

// 二进制指令结构体
// 指令码+操作数
struct Instruction
{
  BinIns op;            // 指令码只占一个字节
  uint8_t arg[3] = {0}; // 操作数，占个字节
};

#endif
